package com.itheima.C04_array;

public class C04_api_array {
    public static void main(String[] args) {
        Dog dog1 = new Dog();
        dog1.eat();
        Animal cat=new Animal(){
            @Override
            public void eat() {
                System.out.println("猫吃鱼");
            }
        };
        cat.eat();
        Animal pig=()-> System.out.println("猪吃草");
        pig.eat();
    }

}
